package com.itheima.controller;

import com.itheima.common.entity.Result;
import com.itheima.pojo.dto.MemberDTO;
import com.itheima.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/member")
public class MemberController {
    @Autowired
    public MemberService memberService;

    @PostMapping("/login")
    public Result login(@RequestBody MemberDTO memberDTO) {
        return memberService.login(memberDTO);
    }
}
